package net.hserver.apm.plugin;

import cn.hserver.core.interfaces.HumAdapter;
import cn.hserver.core.ioc.annotation.Bean;
import cn.hserver.core.server.context.HumMessage;
import cn.hserver.core.server.handlers.Hum;
import net.hserver.apm.common.DataConfig;

import static net.hserver.apm.common.DataConfig.APM_LIVE;


@Bean
public class DataHum implements HumAdapter {
    public void message(HumMessage humMessage, Hum hum) {
        if (APM_LIVE.equals(humMessage.getType())) {
            DataConfig.hum = hum;
        }
    }
}
